package uk.co.q3c.deplan.server.domain.resource;

import java.text.SimpleDateFormat;
import java.util.Calendar;

import uk.co.q3c.deplan.server.util.Q3Calendar;

public class ResourceBooking {
	static SimpleDateFormat sdf = new SimpleDateFormat("dd MMM yyyy HH:mm:ss");

	public ResourceBooking() {
	}

	private Calendar di;
	private int effort;

	public Calendar getDi() {
		return di;
	}

	public void setDi(Calendar di) {
		this.di = new Q3Calendar(di.getTimeInMillis());
	}

	public int getEffort() {
		return effort;
	}

	public void setEffort(int effort) {
		this.effort = effort;
	}

	@Override
	public String toString() {
		return "provisional booking on " + sdf.format(di.getTime()) + " for " + effort + "minutes";
	}

}
